package demo4;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static void main(String[] args) {
        String date = "2015-04-11 12:45:14";
        try {
            ParseDate(date);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    public static void ParseDate(String date) throws Exception{
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            Date d =  sdf.parse(date);
            System.out.println(d);
            InputStream is = new FileInputStream("E:/meinv.jpg");
    }
}
